package br.usp.ime.amazon;

import java.util.ArrayList;
import java.util.List;

import br.usp.ime.colmeia.utils.ConversorObraAmazon;

public class ResultSearch {
		
	private int total=0;
	private List<Book> books;
	
	public ResultSearch() {
		books = new ArrayList<Book>();
		total = 0;
	}

	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public List<Book> getBooks() {
		return books;
	}

	public void setBooks(List<Book> books) {
		this.books = books;
	}
	
	public String getXml(){
		ConversorObraAmazon conversor = new ConversorObraAmazon();
		for(Book b : this.getBooks()){
			conversor.converteObraXml(b);
		}
		return conversor.getTextoXMLFormatado();
	}
	
}